[PATCH] <short summary of the patch>
authorCamm Maguire <camm@debian.org>
Tue, 23 Jun 2026 18:56:31 +0000 (18:56 +0000)
committerCamm Maguire <camm@debian.org>
Thu, 16 Jul 2026 16:43:44 +0000 (12:43 -0400)
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

Gbp-Pq: Name Version_2_7_2pre30

37 files changed:
Makefile.am
Makefile.in
ansi-tests/compile-file.lsp
ansi-tests/gclload.lsp
cmpnew/gcl_cmpeval.lsp
cmpnew/gcl_cmpmain.lsp
cmpnew/gcl_cmptop.lsp
configure
configure.ac
gcl-tk/tkl.lisp
git.tag
h/error.h
h/gclincl.h.in
h/notcomp.h
h/object.h
h/pool.h
h/protoize.h
lsp/gcl_iolib.lsp
o/alloc.c
o/assignment.c
o/cfun.c
o/cmpaux.c
o/disable_aslr.c [new file with mode: 0644]
o/error.c
o/eval.c
o/file.d
o/gbc.c
o/gmp.c
o/main.c
o/nsocket.c
o/num_rand.c
o/save.c
o/sgbc.c
o/unexmacosx.c
o/unixfsys.c
o/unixsave.c
o/usig2.c

index 23c904ff8ff2f805d0f27bf1531dd430cb7fd6db..12c526d553532204a73f7c8c285a266e48530876 100644 (file)
@@ -158,7 +158,7 @@ C_SRC=o/typespec.c o/alloc.c o/gbc.c  o/main.c o/eval.c o/macros.c o/lex.c o/bds
       o/unixfsys.c o/unixfasl.c o/error.c o/unixtime.c o/unixsys.c o/unixsave.c o/funlink.c  o/fat_string.c\
       o/run_process.c o/usig.c o/usig2.c o/utils.c o/makefun.c o/sockets.c o/gmp_wrappers.c\
       o/nsocket.c o/prelink.c o/sfasl.c o/msbrk.c \
-      o/user_init.c o/user_match.c o/mapfun.c
+      o/user_init.c o/user_match.c o/mapfun.c o/disable_aslr.c
 #     o/bitop.c o/nfunlink.c o/clxsocket.c
 #     o/bcmp.c o/bcopy.c o/bzero.c
 
@@ -260,7 +260,7 @@ unixport/saved_%: | unixport/raw_% unixport/gcl_cmpnopt_%.lsp \
                echo "(system:save-system \"../$@\")" | \
                cat ../unixport/init_raw.lsp prof_init.lsp - | \
                        GCL_LSPSYSDIR=../$(srcdir)/unixport/ \
-                               ../unixport/raw_$* $$(dirname $$(pwd))/unixport/ -libdir $$(dirname $$(pwd))/  && \
+                               ../unixport/raw_$* unixport/ -libdir ./  && \
                rm -f ../unixport/gcl_cmpnopt.lsp
        rm -rf sb_$*
 
@@ -605,14 +605,16 @@ info/gcl%.texi: info/gcl.texi
        touch $@
 
 %.info: %.texi | xbin/mktmp # FIXME parallel ugliness
-       i=$$($| $@);ln -f $< $$i;$(MAKEINFO) $$i --output $@;rm -f $$i
+       i=$$($| $@);ln -f $< $$i;mkdir $$i.d;cp $(<D)/*.texi $$i.d;$(MAKEINFO) $$i.d/$(<F) --output $@;rm -rf $$i*
 %.pdf: %.dvi | xbin/mktmp
        i=$$($| $@);j=$$i.$$(echo $< | sed 's,.*\.,,g');ln -f $< $$j;\
-               dvipdfm $$j -o $@ && rm -f $$i*
+               mkdir $$j.d;cp $< $$j.d;(cd  $$j.d;dvipdfm $(<F)) && mv $$j.d/$(*F).pdf $@ && rm -rf $$i*
 %.dvi: %.texi | xbin/mktmp
        i=$$($| $@);j=$$i.$$(echo $< | sed 's,.*\.,,g');ln -f $< $$j;\
                TEXINPUTS=$(srcdir):$$TEXINPUTS \
-               tex -output-directory=$(@D) $$j|tail && mv $$i.dvi $@ && rm -f $$i*
+               mkdir $$j.d;cp $(<D)/*.texi $$j.d;\
+               (cd $$j.d;TEXINPUTS=$(srcdir):$$TEXINPUTS \
+               tex --output-comment="TeX output" $(<F)|tail) && mv $$j.d/$(*F).dvi $@ && rm -rf $$i*
 %.html: %.texi | xbin/mktmp
        mkdir -p $@
        i=$$($| $@);ln -f $< $$i;$(MAKEINFO) --html $$i --output $@;rm -f $$i
index 0383b49782ff519863d5f9895ceabefd9fbc7b3e..5676efe7283dcbf30e4049f5865ac69cbaa06d74 100644 (file)
@@ -187,16 +187,17 @@ am__lib_libbase_gcl_a_SOURCES_DIST = o/typespec.c o/alloc.c o/gbc.c \
        o/fat_string.c o/run_process.c o/usig.c o/usig2.c o/utils.c \
        o/makefun.c o/sockets.c o/gmp_wrappers.c o/nsocket.c \
        o/prelink.c o/sfasl.c o/msbrk.c o/user_init.c o/user_match.c \
-       o/mapfun.c h/compbas2.h h/compbas.h h/compprotos.h h/cstack.h \
-       h/enum.h h/error.h h/eval.h h/fixnum.h h/frame.h h/funlink.h \
-       h/globals.h h/gmp_wrappers.h h/immnum.h h/include.h h/lex.h \
-       h/linux.h h/lu.h h/make-init.h h/mp.h h/notcomp.h \
-       h/num_include.h h/object.h h/options.h h/page.h h/pageinfo.h \
-       h/pbits.h h/pool.h h/prelink.h h/protoize.h h/ptable.h \
-       h/rgbc.h h/sfun_argd.h h/stacks.h h/type.h h/usig.h h/vs.h \
-       h/writable.h o/regexp.h h/arth.h h/bsd.h h/bds.h h/att_ext.h \
-       h/bfdef.h h/compat.h gcl-tk/sheader.h h/make-decl.h h/defun.h \
-       o/ntheap.h h/compdefs.h h/cmpincl1.h h/mgmp.h h/cmponly_last.h \
+       o/mapfun.c o/disable_aslr.c h/compbas2.h h/compbas.h \
+       h/compprotos.h h/cstack.h h/enum.h h/error.h h/eval.h \
+       h/fixnum.h h/frame.h h/funlink.h h/globals.h h/gmp_wrappers.h \
+       h/immnum.h h/include.h h/lex.h h/linux.h h/lu.h h/make-init.h \
+       h/mp.h h/notcomp.h h/num_include.h h/object.h h/options.h \
+       h/page.h h/pageinfo.h h/pbits.h h/pool.h h/prelink.h \
+       h/protoize.h h/ptable.h h/rgbc.h h/sfun_argd.h h/stacks.h \
+       h/type.h h/usig.h h/vs.h h/writable.h o/regexp.h h/arth.h \
+       h/bsd.h h/bds.h h/att_ext.h h/bfdef.h h/compat.h \
+       gcl-tk/sheader.h h/make-decl.h h/defun.h o/ntheap.h \
+       h/compdefs.h h/cmpincl1.h h/mgmp.h h/cmponly_last.h \
        h/elf32_armhf_reloc.h h/elf32_armhf_reloc_special.h \
        h/elf32_arm_reloc.h h/elf32_arm_reloc_special.h \
        h/elf32_hppa_reloc.h h/elf32_hppa_reloc_special.h \
@@ -245,7 +246,7 @@ am__objects_1 = o/typespec.$(OBJEXT) o/alloc.$(OBJEXT) o/gbc.$(OBJEXT) \
        o/gmp_wrappers.$(OBJEXT) o/nsocket.$(OBJEXT) \
        o/prelink.$(OBJEXT) o/sfasl.$(OBJEXT) o/msbrk.$(OBJEXT) \
        o/user_init.$(OBJEXT) o/user_match.$(OBJEXT) \
-       o/mapfun.$(OBJEXT)
+       o/mapfun.$(OBJEXT) o/disable_aslr.$(OBJEXT)
 am__objects_2 =
 @AMM_LIBBOOT_FALSE@am__objects_3 = o/boot.$(OBJEXT)
 am_lib_libbase_gcl_a_OBJECTS = $(am__objects_1) $(am__objects_2) \
@@ -273,16 +274,17 @@ am__lib_libbase_gcl_gprof_a_SOURCES_DIST = o/typespec.c o/alloc.c \
        o/fat_string.c o/run_process.c o/usig.c o/usig2.c o/utils.c \
        o/makefun.c o/sockets.c o/gmp_wrappers.c o/nsocket.c \
        o/prelink.c o/sfasl.c o/msbrk.c o/user_init.c o/user_match.c \
-       o/mapfun.c h/compbas2.h h/compbas.h h/compprotos.h h/cstack.h \
-       h/enum.h h/error.h h/eval.h h/fixnum.h h/frame.h h/funlink.h \
-       h/globals.h h/gmp_wrappers.h h/immnum.h h/include.h h/lex.h \
-       h/linux.h h/lu.h h/make-init.h h/mp.h h/notcomp.h \
-       h/num_include.h h/object.h h/options.h h/page.h h/pageinfo.h \
-       h/pbits.h h/pool.h h/prelink.h h/protoize.h h/ptable.h \
-       h/rgbc.h h/sfun_argd.h h/stacks.h h/type.h h/usig.h h/vs.h \
-       h/writable.h o/regexp.h h/arth.h h/bsd.h h/bds.h h/att_ext.h \
-       h/bfdef.h h/compat.h gcl-tk/sheader.h h/make-decl.h h/defun.h \
-       o/ntheap.h h/compdefs.h h/cmpincl1.h h/mgmp.h h/cmponly_last.h \
+       o/mapfun.c o/disable_aslr.c h/compbas2.h h/compbas.h \
+       h/compprotos.h h/cstack.h h/enum.h h/error.h h/eval.h \
+       h/fixnum.h h/frame.h h/funlink.h h/globals.h h/gmp_wrappers.h \
+       h/immnum.h h/include.h h/lex.h h/linux.h h/lu.h h/make-init.h \
+       h/mp.h h/notcomp.h h/num_include.h h/object.h h/options.h \
+       h/page.h h/pageinfo.h h/pbits.h h/pool.h h/prelink.h \
+       h/protoize.h h/ptable.h h/rgbc.h h/sfun_argd.h h/stacks.h \
+       h/type.h h/usig.h h/vs.h h/writable.h o/regexp.h h/arth.h \
+       h/bsd.h h/bds.h h/att_ext.h h/bfdef.h h/compat.h \
+       gcl-tk/sheader.h h/make-decl.h h/defun.h o/ntheap.h \
+       h/compdefs.h h/cmpincl1.h h/mgmp.h h/cmponly_last.h \
        h/elf32_armhf_reloc.h h/elf32_armhf_reloc_special.h \
        h/elf32_arm_reloc.h h/elf32_arm_reloc_special.h \
        h/elf32_hppa_reloc.h h/elf32_hppa_reloc_special.h \
@@ -367,7 +369,8 @@ am__objects_5 = o/lib_libbase_gcl_gprof_a-typespec.$(OBJEXT) \
        o/lib_libbase_gcl_gprof_a-msbrk.$(OBJEXT) \
        o/lib_libbase_gcl_gprof_a-user_init.$(OBJEXT) \
        o/lib_libbase_gcl_gprof_a-user_match.$(OBJEXT) \
-       o/lib_libbase_gcl_gprof_a-mapfun.$(OBJEXT)
+       o/lib_libbase_gcl_gprof_a-mapfun.$(OBJEXT) \
+       o/lib_libbase_gcl_gprof_a-disable_aslr.$(OBJEXT)
 @AMM_LIBBOOT_FALSE@am__objects_6 =  \
 @AMM_LIBBOOT_FALSE@    o/lib_libbase_gcl_gprof_a-boot.$(OBJEXT)
 am__objects_7 = $(am__objects_5) $(am__objects_2) $(am__objects_2) \
@@ -492,8 +495,8 @@ am__depfiles_remade = bin/$(DEPDIR)/dpp.Po \
        o/$(DEPDIR)/bind.Po o/$(DEPDIR)/block.Po o/$(DEPDIR)/boot.Po \
        o/$(DEPDIR)/catch.Po o/$(DEPDIR)/cfun.Po \
        o/$(DEPDIR)/character.Po o/$(DEPDIR)/cmpaux.Po \
-       o/$(DEPDIR)/conditional.Po o/$(DEPDIR)/earith.Po \
-       o/$(DEPDIR)/error.Po o/$(DEPDIR)/eval.Po \
+       o/$(DEPDIR)/conditional.Po o/$(DEPDIR)/disable_aslr.Po \
+       o/$(DEPDIR)/earith.Po o/$(DEPDIR)/error.Po o/$(DEPDIR)/eval.Po \
        o/$(DEPDIR)/fat_string.Po o/$(DEPDIR)/file.Po \
        o/$(DEPDIR)/format.Po o/$(DEPDIR)/frame.Po \
        o/$(DEPDIR)/funlink.Po o/$(DEPDIR)/gbc.Po \
@@ -514,6 +517,7 @@ am__depfiles_remade = bin/$(DEPDIR)/dpp.Po \
        o/$(DEPDIR)/lib_libbase_gcl_gprof_a-character.Po \
        o/$(DEPDIR)/lib_libbase_gcl_gprof_a-cmpaux.Po \
        o/$(DEPDIR)/lib_libbase_gcl_gprof_a-conditional.Po \
+       o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Po \
        o/$(DEPDIR)/lib_libbase_gcl_gprof_a-earith.Po \
        o/$(DEPDIR)/lib_libbase_gcl_gprof_a-error.Po \
        o/$(DEPDIR)/lib_libbase_gcl_gprof_a-eval.Po \
@@ -870,7 +874,6 @@ TK_INCLUDE = @TK_INCLUDE@
 TK_LIBRARY = @TK_LIBRARY@
 TK_LIB_SPEC = @TK_LIB_SPEC@
 TK_XLIB_DIR = @TK_XLIB_DIR@
-USE_CLEANUP = @USE_CLEANUP@
 VERSION = @VERSION@
 WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
 XMKMF = @XMKMF@
@@ -1056,7 +1059,7 @@ C_SRC = o/typespec.c o/alloc.c o/gbc.c  o/main.c o/eval.c o/macros.c o/lex.c o/b
       o/unixfsys.c o/unixfasl.c o/error.c o/unixtime.c o/unixsys.c o/unixsave.c o/funlink.c  o/fat_string.c\
       o/run_process.c o/usig.c o/usig2.c o/utils.c o/makefun.c o/sockets.c o/gmp_wrappers.c\
       o/nsocket.c o/prelink.c o/sfasl.c o/msbrk.c \
-      o/user_init.c o/user_match.c o/mapfun.c
+      o/user_init.c o/user_match.c o/mapfun.c o/disable_aslr.c
 
 #     o/bitop.c o/nfunlink.c o/clxsocket.c
 #     o/bcmp.c o/bcopy.c o/bzero.c
@@ -1390,6 +1393,8 @@ o/msbrk.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
 o/user_init.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
 o/user_match.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
 o/mapfun.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
+o/disable_aslr.$(OBJEXT): o/$(am__dirstamp) \
+       o/$(DEPDIR)/$(am__dirstamp)
 o/boot.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
 o/character.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
 o/file.$(OBJEXT): o/$(am__dirstamp) o/$(DEPDIR)/$(am__dirstamp)
@@ -1534,6 +1539,8 @@ o/lib_libbase_gcl_gprof_a-user_match.$(OBJEXT): o/$(am__dirstamp) \
        o/$(DEPDIR)/$(am__dirstamp)
 o/lib_libbase_gcl_gprof_a-mapfun.$(OBJEXT): o/$(am__dirstamp) \
        o/$(DEPDIR)/$(am__dirstamp)
+o/lib_libbase_gcl_gprof_a-disable_aslr.$(OBJEXT): o/$(am__dirstamp) \
+       o/$(DEPDIR)/$(am__dirstamp)
 o/lib_libbase_gcl_gprof_a-boot.$(OBJEXT): o/$(am__dirstamp) \
        o/$(DEPDIR)/$(am__dirstamp)
 o/lib_libbase_gcl_gprof_a-gprof.$(OBJEXT): o/$(am__dirstamp) \
@@ -1748,6 +1755,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/character.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/cmpaux.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/conditional.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/disable_aslr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/earith.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/error.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/eval.Po@am__quote@ # am--include-marker
@@ -1778,6 +1786,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-character.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-cmpaux.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-conditional.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-earith.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-error.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@o/$(DEPDIR)/lib_libbase_gcl_gprof_a-eval.Po@am__quote@ # am--include-marker
@@ -2760,6 +2769,20 @@ o/lib_libbase_gcl_gprof_a-mapfun.obj: o/mapfun.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -c -o o/lib_libbase_gcl_gprof_a-mapfun.obj `if test -f 'o/mapfun.c'; then $(CYGPATH_W) 'o/mapfun.c'; else $(CYGPATH_W) '$(srcdir)/o/mapfun.c'; fi`
 
+o/lib_libbase_gcl_gprof_a-disable_aslr.o: o/disable_aslr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -MT o/lib_libbase_gcl_gprof_a-disable_aslr.o -MD -MP -MF o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Tpo -c -o o/lib_libbase_gcl_gprof_a-disable_aslr.o `test -f 'o/disable_aslr.c' || echo '$(srcdir)/'`o/disable_aslr.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Tpo o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='o/disable_aslr.c' object='o/lib_libbase_gcl_gprof_a-disable_aslr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -c -o o/lib_libbase_gcl_gprof_a-disable_aslr.o `test -f 'o/disable_aslr.c' || echo '$(srcdir)/'`o/disable_aslr.c
+
+o/lib_libbase_gcl_gprof_a-disable_aslr.obj: o/disable_aslr.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -MT o/lib_libbase_gcl_gprof_a-disable_aslr.obj -MD -MP -MF o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Tpo -c -o o/lib_libbase_gcl_gprof_a-disable_aslr.obj `if test -f 'o/disable_aslr.c'; then $(CYGPATH_W) 'o/disable_aslr.c'; else $(CYGPATH_W) '$(srcdir)/o/disable_aslr.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Tpo o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='o/disable_aslr.c' object='o/lib_libbase_gcl_gprof_a-disable_aslr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -c -o o/lib_libbase_gcl_gprof_a-disable_aslr.obj `if test -f 'o/disable_aslr.c'; then $(CYGPATH_W) 'o/disable_aslr.c'; else $(CYGPATH_W) '$(srcdir)/o/disable_aslr.c'; fi`
+
 o/lib_libbase_gcl_gprof_a-boot.o: o/boot.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib_libbase_gcl_gprof_a_CPPFLAGS) $(CPPFLAGS) $(lib_libbase_gcl_gprof_a_CFLAGS) $(CFLAGS) -MT o/lib_libbase_gcl_gprof_a-boot.o -MD -MP -MF o/$(DEPDIR)/lib_libbase_gcl_gprof_a-boot.Tpo -c -o o/lib_libbase_gcl_gprof_a-boot.o `test -f 'o/boot.c' || echo '$(srcdir)/'`o/boot.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) o/$(DEPDIR)/lib_libbase_gcl_gprof_a-boot.Tpo o/$(DEPDIR)/lib_libbase_gcl_gprof_a-boot.Po
@@ -4011,6 +4034,7 @@ distclean: distclean-am
        -rm -f o/$(DEPDIR)/character.Po
        -rm -f o/$(DEPDIR)/cmpaux.Po
        -rm -f o/$(DEPDIR)/conditional.Po
+       -rm -f o/$(DEPDIR)/disable_aslr.Po
        -rm -f o/$(DEPDIR)/earith.Po
        -rm -f o/$(DEPDIR)/error.Po
        -rm -f o/$(DEPDIR)/eval.Po
@@ -4041,6 +4065,7 @@ distclean: distclean-am
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-character.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-cmpaux.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-conditional.Po
+       -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-earith.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-error.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-eval.Po
@@ -4323,6 +4348,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f o/$(DEPDIR)/character.Po
        -rm -f o/$(DEPDIR)/cmpaux.Po
        -rm -f o/$(DEPDIR)/conditional.Po
+       -rm -f o/$(DEPDIR)/disable_aslr.Po
        -rm -f o/$(DEPDIR)/earith.Po
        -rm -f o/$(DEPDIR)/error.Po
        -rm -f o/$(DEPDIR)/eval.Po
@@ -4353,6 +4379,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-character.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-cmpaux.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-conditional.Po
+       -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-disable_aslr.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-earith.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-error.Po
        -rm -f o/$(DEPDIR)/lib_libbase_gcl_gprof_a-eval.Po
@@ -4572,7 +4599,7 @@ unixport/saved_%: | unixport/raw_% unixport/gcl_cmpnopt_%.lsp \
                echo "(system:save-system \"../$@\")" | \
                cat ../unixport/init_raw.lsp prof_init.lsp - | \
                        GCL_LSPSYSDIR=../$(srcdir)/unixport/ \
-                               ../unixport/raw_$* $$(dirname $$(pwd))/unixport/ -libdir $$(dirname $$(pwd))/  && \
+                               ../unixport/raw_$* unixport/ -libdir ./  && \
                rm -f ../unixport/gcl_cmpnopt.lsp
        rm -rf sb_$*
 
@@ -4896,14 +4923,16 @@ info/gcl%.texi: info/gcl.texi
        touch $@
 
 %.info: %.texi | xbin/mktmp # FIXME parallel ugliness
-       i=$$($| $@);ln -f $< $$i;$(MAKEINFO) $$i --output $@;rm -f $$i
+       i=$$($| $@);ln -f $< $$i;mkdir $$i.d;cp $(<D)/*.texi $$i.d;$(MAKEINFO) $$i.d/$(<F) --output $@;rm -rf $$i*
 %.pdf: %.dvi | xbin/mktmp
        i=$$($| $@);j=$$i.$$(echo $< | sed 's,.*\.,,g');ln -f $< $$j;\
-               dvipdfm $$j -o $@ && rm -f $$i*
+               mkdir $$j.d;cp $< $$j.d;(cd  $$j.d;dvipdfm $(<F)) && mv $$j.d/$(*F).pdf $@ && rm -rf $$i*
 %.dvi: %.texi | xbin/mktmp
        i=$$($| $@);j=$$i.$$(echo $< | sed 's,.*\.,,g');ln -f $< $$j;\
                TEXINPUTS=$(srcdir):$$TEXINPUTS \
-               tex -output-directory=$(@D) $$j|tail && mv $$i.dvi $@ && rm -f $$i*
+               mkdir $$j.d;cp $(<D)/*.texi $$j.d;\
+               (cd $$j.d;TEXINPUTS=$(srcdir):$$TEXINPUTS \
+               tex --output-comment="TeX output" $(<F)|tail) && mv $$j.d/$(*F).dvi $@ && rm -rf $$i*
 %.html: %.texi | xbin/mktmp
        mkdir -p $@
        i=$$($| $@);ln -f $< $$i;$(MAKEINFO) --html $$i --output $@;rm -f $$i
index 1d2d7443ba5141c5c02724ad5e31ff8b19346f0e..345991cd3d35c987fa70423921d1f84d37685188 100644 (file)
       (destructuring-bind
          (output-truename warnings-p failure-p)
          vals
-       (print (namestring (truename target-pathname)))
-       (print (namestring output-truename))
+;      (print (namestring (truename target-pathname)))
+;      (print (namestring output-truename))
        (values
-        (let ((v1 (or print verbose
+        (let ((v0 (string= (namestring (truename target-pathname)) (namestring output-truename)))
+              (v1 (or print verbose
                       (and (not print-p) *compile-print*)
                       (and (not verbose-p) *compile-verbose*)
                       (string= str "")))
@@ -57,8 +58,8 @@
               (v7 (equalpt-or-report (namestring (truename target-pathname))
                                      (namestring output-truename)))
               (v8 (not (fboundp funname))))
-          (if (and v1 v2 v3 v4 v5 v6 (eql v7 t) v8) t
-            (list v1 v2 v3 v4 v5 v6 v7 v8)))
+          (if (and v0 v1 v2 v3 v4 v5 v6 (eql v7 t) v8) t
+            (list v0 v1 v2 v3 v4 v5 v6 v7 v8)))
         (progn
           (load output-truename)
           (funcall funname)))))))
index 7a0adad1f08031a17cdcd6faa21e8fa34ba020e4..7917e1766390aa2a967255805342c601cc4e93f3 100644 (file)
@@ -39,4 +39,5 @@
 
 ;#+gcl(fpe::break-on-floating-point-exceptions :division-by-zero t :floating-point-overflow t :floating-point-underflow t)
 
-(time (regression-test:do-tests))
+(regression-test:do-tests)
+;(time (regression-test:do-tests))
index e248a5044923cd2579cb04f07f72f6de6eb13784..d6b71a68334b0dd5d40c9dc0a09dd18a9a6040ca 100644 (file)
   (with-open-file (s f :direction :output)
     (prin1 '(in-package :compiler) s)
     (terpri s)
-    (maphash (lambda (x y)
+    (mapc (lambda (l &aux (x (pop l)) (y (car l)))
               (prin1
                `(merge-inls
                  ',x
                             (car y))))
                s)
               (terpri s))
-            *inl-hash*))
+         (let (r)
+           (maphash (lambda (x y) (push (list x y) r)) *inl-hash*)
+           (sort r 'string< :key (lambda (x) (prin1-to-string (car x)))))))
   nil)
 
 (defun show-inls (fn)
index 6abf02458ed39a83670e7b089e197ffced98a1b9..5033c921f89271113e15fbb753374828339c29d4 100644 (file)
 (defvar *c-debug* nil)
 (defvar *dump-inl-hash* nil)
 (defun compile-file1 (input-pathname
-                      &key (output-file (compile-file-pathname (truename input-pathname)))
+                      &key (output-file (compile-file-pathname input-pathname))
                            (o-file t)
                            (c-file *default-c-file*)
                            (h-file *default-h-file*)
@@ -261,7 +261,7 @@ Cannot compile ~a.~%" (namestring (merge-pathnames input-pathname *compiler-defa
    (setq *init-name* (init-name output-file t))
    (delete-file output-file)
    (setq *function-filename* (unless *compiler-compile*
-                              (namestring (truename (pathname *compiler-input*)))))
+                              (namestring (pathname *compiler-input*))))
 
    (let* ((eof (cons nil nil))
          (device (pathname-device output-file))
@@ -615,7 +615,11 @@ Cannot compile ~a.~%" (namestring (merge-pathnames input-pathname *compiler-defa
        (concatenate 'string (subseq flags 0 i) (remove-flag flag (subseq flags (+ i (length flag)))))
       flags)))
 
-(defun compiler-command (&rest args )
+(defun compiler-command (&rest args
+                        &aux
+                          (*cc* (mysub *cc* "<CWD>"
+                                       (let ((s (namestring si::*current-directory*)))
+                                         (subseq s 0 (1- (length s)))))))
   (declare (special *c-debug*))
   (format nil  "~a ~a -I~a ~a ~a -c ~a -o ~a"
          (concatenate 'string
index 9caef52e00c40e37d786563e5b4f25a11740c889..4d3caa66722acfdea46ebd81547f595a258adb67 100644 (file)
 (defun init-name (p &optional sp)
 
   (if sp
-      (let* ((p (truename p))
-            (pn (pathname-name p))
+      (let* ((pn (pathname-name p))
             (g (zerop (si::string-match #v"^gcl_" pn))))
        (dash-to-underscore
         (namestring
       (dash-to-underscore fname)
       "__"
       (if (boundp '*compiler-input*)
-         (subseq *init-name* 4)
+         *init-name*
        "")))))
 
 (defvar *top-form* nil)
index 303253455b2ba72129a5b595f3b77f1088ab2ada..6e8ab502e606362f289afc74e66e7caace50aa0b 100755 (executable)
--- a/configure
+++ b/configure
@@ -663,7 +663,6 @@ TCLSH
 HAVE_SIGEMT
 HAVE_SIGSYS
 HAVE_SV_ONSTACK
-USE_CLEANUP
 HAVE_PUTENV
 HAVE_SETENV
 NO_PROFILE
@@ -813,6 +812,7 @@ enable_debug
 enable_static
 enable_pic
 enable_dependency_tracking
+enable_aslr
 enable_text_base
 enable_segment_alignment_bits
 enable_initial_heap_vmsize
@@ -1493,6 +1493,7 @@ Optional Features:
                           do not reject slow dependency extractors
   --disable-dependency-tracking
                           speeds up one-time build
+  --disable-aslr will ensure reproducible builds and/or work around absent no-pie
   --enable-text_base=0x.... set base address for __TEXT
   --enable-segment_alignment_bits=... set bit alignment for mach-o image segments
   --enable-initial_heap_vmsize=0x.... set heap size for raw images
@@ -7442,6 +7443,35 @@ add_args_to_cflags  -fsigned-char -pipe -fcommon \
 
 add_args_to_ldflags -no-pie -Wl,-z,relro # -Wl,-z,lazy
 
+# Check whether --enable-aslr was given.
+if test ${enable_aslr+y}
+then :
+  enableval=$enable_aslr; enable_aslr=$enableval
+else case e in #(
+  e) enable_asrl="yes" ;;
+esac
+fi
+
+
+{ printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking whether aslr must be disabled due to absent -no-pie" >&5
+printf %s "checking whether aslr must be disabled due to absent -no-pie... " >&6; }
+if ! echo $LDFLAGS |grep -q -w '\-no\-pie'; then
+   { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf '%s\n' "yes" >&6; }
+   enable_aslr="no"
+else
+   { printf '%s\n' "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf '%s\n' "no" >&6; }
+fi
+
+if test "$enable_aslr" != "yes" ; then
+
+printf '%s\n' "#define DISABLE_ASLR 1" >>confdefs.h
+
+fi
+
+
+
 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking for inline semantics" >&5
 printf %s "checking for inline semantics... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
 fi
 
-ac_fn_c_check_func "$LINENO" "_cleanup" "ac_cv_func__cleanup"
-if test "x$ac_cv_func__cleanup" = xyes
-then :
-
-printf '%s\n' "#define USE_CLEANUP 1" >>confdefs.h
-
-fi
-
-
-
 { printf '%s\n' "$as_me:${as_lineno-$LINENO}: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
 printf %s "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... " >&6; }
 
@@ -12142,7 +12162,8 @@ LI_GITTAG="$GIT_TAG"
 LI_RELEASE="$RELEASE"
 
 #LI_CC="\"$GCL_CC -c `echo " $FINAL_CFLAGS $LISP_CFLAGS" | sed 's,-pg\b,,g'`\""
-LI_CC="\"$GCL_CC -c `echo " $FINAL_CFLAGS" | sed 's,-pg\b,,g'`\""
+STRIP_FINAL_CFLAGS=`echo $FINAL_CFLAGS | sed "s,$(pwd),<CWD>,g"`
+LI_CC="\"$GCL_CC -c `echo " $STRIP_FINAL_CFLAGS" | sed 's,-pg\b,,g'`\""
 
 LI_DFP="\"$GPL_FLAG\""
 
index bf620e4f3c1d5ab920089b89a5b987a1e8534a5a..2c783f30fdd2d965255e47c9e692e00811cc8675 100644 (file)
@@ -286,6 +286,23 @@ add_args_to_cflags  -fsigned-char -pipe -fcommon \
 
 add_args_to_ldflags -no-pie -Wl,-z,relro # -Wl,-z,lazy
 
+AC_ARG_ENABLE([aslr],[  --disable-aslr will ensure reproducible builds and/or work around absent no-pie],
+             [enable_aslr=$enableval],[enable_asrl="yes"])
+
+AC_MSG_CHECKING([whether aslr must be disabled due to absent -no-pie])
+if ! echo $LDFLAGS |grep -q -w '\-no\-pie'; then
+   AC_MSG_RESULT([yes])
+   enable_aslr="no"
+else
+   AC_MSG_RESULT([no])
+fi
+
+if test "$enable_aslr" != "yes" ; then
+      AC_DEFINE([DISABLE_ASLR],[1],[disable aslr])
+fi
+
+
+
 AC_MSG_CHECKING([for inline semantics])
 AC_COMPILE_IFELSE(
     [AC_LANG_SOURCE([[
@@ -1739,9 +1756,6 @@ if test "$no_setenv" = "1" ; then
     AC_SUBST(HAVE_PUTENV)
 fi
 
-AC_CHECK_FUNC(_cleanup, [AC_DEFINE(USE_CLEANUP,1,[have _cleanup function])],)
-AC_SUBST(USE_CLEANUP)
-
 AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
 
 case $system in
@@ -1948,7 +1962,8 @@ AC_SUBST(LI_GITTAG)
 LI_RELEASE="$RELEASE"
 AC_SUBST(LI_RELEASE)
 #LI_CC="\"$GCL_CC -c `echo " $FINAL_CFLAGS $LISP_CFLAGS" | sed 's,-pg\b,,g'`\""
-LI_CC="\"$GCL_CC -c `echo " $FINAL_CFLAGS" | sed 's,-pg\b,,g'`\""
+STRIP_FINAL_CFLAGS=`echo $FINAL_CFLAGS | sed "s,$(pwd),<CWD>,g"`
+LI_CC="\"$GCL_CC -c `echo " $STRIP_FINAL_CFLAGS" | sed 's,-pg\b,,g'`\""
 AC_SUBST(LI_CC)
 LI_DFP="\"$GPL_FLAG\""
 AC_SUBST(LI_DFP)
index 08649ec6d678bd3cfa5bfc0493df263c3e4ebc89..86d35c9a118c236e8cde2de3e6b46b77a1f0dd73 100644 (file)
@@ -1496,7 +1496,7 @@ on ~a as in: ~s~%" host command )))
    (format st "~%(in-package ~s)" (package-name *package*))
    (dolist (v lis) (get-file-autoloads v st))
    (format st "~%(in-package ~s)" (package-name *package*))
-   (format st "~2%~s" `(setq si::*load-path* (append ',*paths* si::*load-path*)))
+   ;(format st "~2%~s" `(setq si::*load-path* (append ',*paths* si::*load-path*)))
 
    ))
 
diff --git a/git.tag b/git.tag
index 76fff2341c2fecde42b95734bd1255e4d5b6dbec..b5a6fe3b047c84f08a1d6bfffd868861986d3272 100644 (file)
--- a/git.tag
+++ b/git.tag
@@ -1 +1 @@
-"Version_2_7_2pre28"
+"Version_2_7_2pre30"
index e6f7a4ace46bb66ecd6388b43b5c599f291ea66b..c3f022994fe91e7785a9f4a3f1d6bd6cddea3a47 100644 (file)
--- a/h/error.h
+++ b/h/error.h
@@ -191,12 +191,4 @@ object ihs_top_function_name(ihs_ptr h);
 
 #define ASSERT(a_) do {if (!(a_)) NERROR("The assertion " #a_ " failed");} while (0)
 
-#define gcl_abort()  ({\
-   frame_ptr fr=frs_sch_catch(sSPtop_abort_tagP->s.s_dbind);\
-   vs_base[0]=sSPtop_abort_tagP->s.s_dbind;\
-   vs_top=vs_base+1;\
-   if (fr) unwind(fr,sSPtop_abort_tagP->s.s_dbind);\
-   abort();\
- })
-
 #endif /*ERROR_H*/
index c2209a14a61ca289bab6d613c89b0a1640fc2571..2c8078e8bad4a0aff31bb50b299c2999562cea43 100644 (file)
@@ -15,6 +15,9 @@
 /* debug safecdr code */
 #undef DEBUG_SAFE_CDR
 
+/* disable aslr */
+#undef DISABLE_ASLR
+
 /* big endian word order */
 #undef DOUBLE_BIGENDIAN
 
    backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
-/* have _cleanup function */
-#undef USE_CLEANUP
-
 /* use fionbio for non-blocking io */
 #undef USE_FIONBIO
 
index db45d2b55d70cfce59615e5a90e14630755dc8cb..7598d8272375ebf7b980e83120023d4369a3494f 100755 (executable)
@@ -357,3 +357,5 @@ EXTER gmp_randfnptr_t Mersenne_Twister_Generator_Noseed;
 #define collect(p_,f_) (p_)=&(*(p_)=(f_))->c.c_cdr
 #define READ_STREAM_OR_FASD(strm_) \
   type_of(strm_)==t_stream ? read_object_non_recursive(strm_) : fSread_fasd_top(strm_)
+
+#define NO_TRUENAME (raw_image || no_truename)
index f64607304f62801eedd0fc7eba57c25a47b2f5cb..a6cef3f22b5c84d67fc742842726947acfc6e85c 100644 (file)
@@ -422,7 +422,7 @@ EXTER long holepage;                        /*  hole pages  */
 EXTER fixnum new_holepage,starting_hole_div,starting_relb_heap_mult;
 
 EXTER ulfixnum cumulative_allocation,recent_allocation;
-EXTER ufixnum wait_on_abort;
+EXTER ufixnum wait_on_abort,no_truename;
 EXTER double gc_alloc_min,mem_multiple,gc_page_min,gc_page_max;
 EXTER char *multiprocess_memory_pool;
 
@@ -630,7 +630,7 @@ EXTER object sSlambda_block_expanded;
 # ifdef __GNUC__ 
 # define assert(ex)\
 {if (!(ex)){(void)fprintf(stderr, \
-    "Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);gcl_abort();}}
+    "Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);do_gcl_abort();}}
 # else
 # define assert(ex)
 # endif
@@ -652,7 +652,7 @@ EXTER object sSlambda_block_expanded;
 #define END_NO_INTERRUPT_SAFE \
   signals_allowed = old_signals_allowed; \
   if (signals_pending) \
-    do{ if(signals_allowed ==0) /* should not get here*/gcl_abort(); \
+    do{ if(signals_allowed ==0) /* should not get here*/do_gcl_abort(); \
    raise_pending_signals(sig_safe)}while(0)
 
 
index d1bf39594e155cc20d50f011580897385c1b0c29..646520f214b509536d15b51ce4c40173112d2aa7 100644 (file)
--- a/h/pool.h
+++ b/h/pool.h
@@ -120,6 +120,7 @@ close_pool(void) {
     massert(!close(pool));
     massert(!munmap(Pool,sizeof(struct pool)));
     pool=-1;
+    memset(gcl_pool,0,sizeof(gcl_pool));
   }
 #endif
   
index 07ab0e3c25ad6dc7618f9625a609a87852610aeb..687ccba84d65d28c6624e90935dfa096145aa0ea 100644 (file)
@@ -1675,3 +1675,7 @@ int msbrk_init(void);
 int msbrk_end(void);
 object quick_call_function_vec(object,ufixnum,object *);
 int msbrk_initialized(void);
+void *mdlopen(const char *,int);
+void close_dlopen_list(void);
+void set_global_env_defaults(void);
+void disable_aslr(int,char **,char **);
index 32056ada0d0702b66ab0b1ca69ec12bdca7cbc59..f206330abcf1529f0501d9b8591b0134ab2c2ae6 100644 (file)
       (file-output-stream (when outp (c-stream-fp strm))))))
 
 (defun load-pathname-exists (z)
-  (or (probe-file z)
-      (when *allow-gzipped-file*
-       (when (probe-file (string-concatenate (namestring z) ".gz"))
-         z))))
+  (when (or (probe-file z)
+           (when *allow-gzipped-file*
+             (probe-file (string-concatenate (namestring z) ".gz"))))
+    z))
 
 (defun load-pathname (p print if-does-not-exist external-format
                        &aux (pp (merge-pathnames p))
                        (epp (reduce (lambda (y x) (or y (load-pathname-exists (translate-pathname x "" p))))
                                     '(#P".o" #P".lsp" #P".lisp" #P"") :initial-value nil)));FIXME newest?
   (if epp
-      (let* ((*load-pathname* pp)(*load-truename* epp))
+      (let* ((*load-pathname* pp)(*load-truename* (or (probe-file epp) epp)))
        (with-open-file
         (s epp :external-format external-format)
         (if (member (peek-char nil s nil 'eof) '#.(mapcar 'code-char (list 127 #xcf #xce #x4c #x64)))
index c38a329b1ef15fe8f37da87e913f945a9c2e578e..ca38f530611b8c507d09303f3ea9a916be40465c 100644 (file)
--- a/o/alloc.c
+++ b/o/alloc.c
@@ -1737,6 +1737,7 @@ free(void *ptr) {
   
   for (p = &malloc_list,pp=*p; pp && !endp(pp);  p = &((pp)->c.c_cdr),pp=pp->c.c_cdr)
     if ((pp)->c.c_car->st.st_self == ptr) {
+      memset((pp)->c.c_car->st.st_self,0,(pp)->c.c_car->st.st_dim);
       (pp)->c.c_car->st.st_self = NULL;
       *p = pp->c.c_cdr;
       return;
@@ -1782,6 +1783,7 @@ realloc(void *ptr, size_t size) {
        VFILLP_SET(x,size);
        return(ptr);
       } else {
+       memset(x->st.st_self,0,x->st.st_dim);
        x->st.st_self = alloc_contblock(size);
        x->st.st_dim = size;
        VSET_MAX_FILLP(x);
index 34ea442373500578d4e8adf739301cc1bd31cb24..17d26d34c095fea1f1283a6afa2dd1de119dd372 100644 (file)
@@ -192,7 +192,7 @@ DEFUN("FSET",object,fSfset,SI,2,2,NONE,OO,OO,OO,OO,(object sym,object function),
   if (function->fun.fun_plist!=Cnil) {
     function->fun.fun_plist->c.c_cdr->c.c_cdr->c.c_cdr->c.c_cdr->c.c_cdr->c.c_car=sym;/*FIXME*/
     x=function->fun.fun_plist->c.c_cdr->c.c_cdr->c.c_cdr->c.c_car;
-    function->fun.fun_plist->c.c_cdr->c.c_cdr->c.c_cdr->c.c_car=x==Cnil ? sLAload_truenameA->s.s_dbind : x;
+    function->fun.fun_plist->c.c_cdr->c.c_cdr->c.c_cdr->c.c_car=x==Cnil ? sLAload_pathnameA->s.s_dbind : x;
   }
   RETURN1(function);
 
index f6e3c725fcc04e054936959cf327405866b1522e..c2aaf07b8bd338c2ae0b85f337cf5d07cf752f4a 100644 (file)
--- a/o/cfun.c
+++ b/o/cfun.c
@@ -73,7 +73,27 @@ DEFUN("CFDL",object,fScfdl,SI,0,0,NONE,OO,OO,OO,OO,(void),"") {
   }
   RETURN1(Cnil);
 }
-    
+
+DEFVAR("*DLOPEN-HANDLES*",sSAdlopen_handlesA,SI,Cnil,"");
+
+void
+close_dlopen_list(void) {
+  for (;sSAdlopen_handlesA->s.s_dbind!=Cnil;sSAdlopen_handlesA->s.s_dbind=sSAdlopen_handlesA->s.s_dbind->c.c_cdr)
+    dlclose((void *)fix(sSAdlopen_handlesA->s.s_dbind->c.c_car));
+}
+
+void *
+mdlopen(const char *name,int flags) {
+  void *v=dlopen(name,flags);
+  if (name) {
+    object x=sSAdlopen_handlesA->s.s_dbind;
+    for (;x!=Cnil && fix(x->c.c_car)!=(fixnum)v;x=x->c.c_cdr);
+    if (x==Cnil)
+      sSAdlopen_handlesA->s.s_dbind=MMcons(make_fixnum((fixnum)v),sSAdlopen_handlesA->s.s_dbind);
+  }
+  return v;
+}
+
 DEFUN("DLSYM",object,fSdlsym,SI,2,2,NONE,OI,OO,OO,OO,(fixnum h,object name),"") {
 
   void *ad=0;
index 66378f3ea62e17b5f64beb83076cde9725567f70..6828dfa8845bd9c25efac51a3b202457610306b3 100644 (file)
@@ -613,8 +613,12 @@ gcl_init_or_load1(void (*fn)(void),const char *file) {
 
     printf("Initializing %s\n",file);fflush(stdout);
     lpn=make_simple_string(file);
-    massert(realpath(file,FN1));
-    ltn=make_simple_string(FN1);
+    if (NO_TRUENAME)
+      ltn=lpn;
+    else {
+      massert(realpath(file,FN1));
+      ltn=make_simple_string(FN1);
+    }
     memory=new_cfdata();
     memory->d.tt=1;
     memory->cfd.cfd_name=ltn;
diff --git a/o/disable_aslr.c b/o/disable_aslr.c
new file mode 100644 (file)
index 0000000..a84a650
--- /dev/null
@@ -0,0 +1,139 @@
+#include "include.h"
+
+#ifdef DISABLE_ASLR
+
+#if defined(__APPLE__)
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <spawn.h>
+#include <sys/wait.h>
+#include <mach-o/dyld.h>
+
+#ifndef POSIX_SPAWN_DISABLE_ASLR
+#define POSIX_SPAWN_DISABLE_ASLR 0x0100
+#endif
+
+void
+disable_aslr(int argc, char **argv, char **envp) {
+
+  pid_t pid;
+  posix_spawnattr_t attr;
+
+  if (!_dyld_get_image_vmaddr_slide(0)) {
+    return;
+  }
+
+  posix_spawnattr_init(&attr);
+  posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETEXEC | POSIX_SPAWN_DISABLE_ASLR);
+  if (posix_spawn(&pid, argv[0], NULL, &attr, argv, envp)) {
+    perror("posix_spawn to disable ASLR failed");
+    do_gcl_abort();
+  }
+  posix_spawnattr_destroy(&attr);
+
+}
+
+#else
+
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+
+
+static inline void
+reexec(int argc, char **argv, char **envp) {
+
+  int i,j,k;
+  char **n,**a;
+  void *v;
+
+  for (i=j=0;argv[i];i++)
+    j+=strlen(argv[i])+1;
+  for (k=0;envp[k];k++)
+    j+=strlen(envp[k])+1;
+  j+=(i+k+3)*sizeof(char *);
+
+  msbrk_init();
+  massert((v=sbrk(j))!=(void *)-1);
+
+  a=v;
+  v=a+i+1;
+  n=v;
+  v=n+k+2;
+
+  for (i=0;argv[i];i++) {
+    a[i]=v;
+    strcpy(v,argv[i]);
+    v+=strlen(v)+1;
+  }
+  a[i]=0;
+
+  for (k=0;envp[k];k++) {
+    n[k]=v;
+    strcpy(v,envp[k]);
+    v+=strlen(v)+1;
+  }
+  n[k]="GCL_UNRANDOMIZE=t";
+  n[k+1]=0;
+
+  gcl_cleanup(0);
+  massert(execve(*a,a,n)!=-1);
+
+}
+
+#if defined(__linux__)
+
+#include <sys/personality.h>
+#include <unistd.h>
+
+void
+disable_aslr(int argc, char **argv, char **envp) {
+
+  long pers;
+  long flag = ADDR_NO_RANDOMIZE|(sizeof(flag)==4 ? ADDR_LIMIT_3GB : 0);
+
+  massert((pers=personality(-1))!=-1);
+
+  /*READ_IMPLIES_EXEC is for selinux, but selinux will reset it in the child*/
+  massert((pers=personality(READ_IMPLIES_EXEC|pers))!=-1);
+
+  if ((pers & flag)!=flag && !getenv("GCL_UNRANDOMIZE")) {
+
+    massert(personality(pers | flag)!=-1);
+    massert((personality(-1)&flag)==flag);
+
+    reexec(argc,argv,envp);
+
+  }
+
+}
+
+#elif defined(__FreeBSD_kernel__)
+
+#include <sys/procctl.h>
+
+void
+disable_aslr(int argc, char **argv, char **envp) {
+
+  const int cctl=PROC_ASLR_FORCE_DISABLE;
+  int stat,ctl=cctl;
+
+  massert(procctl(P_PID, 0, PROC_ASLR_STATUS, &stat) != -1);
+
+  if ((stat&cctl)!=cctl && !getenv("GCL_UNRANDOMIZE")) {
+
+    massert(procctl(P_PID, 0, PROC_ASLR_CTL, &ctl) != -1);
+    massert(procctl(P_PID, 0, PROC_ASLR_STATUS, &stat) != -1);
+    massert((stat&cctl)==cctl);
+
+    reexec(argc,argv,envp);
+
+  }
+
+}
+#endif
+
+#endif
+
+#endif
index 5ab57b83670ffc547e485b0aee28aec6849ab76e..fa3e0d54d647f92507186aaad5c43893b4c717f9 100644 (file)
--- a/o/error.c
+++ b/o/error.c
@@ -41,7 +41,7 @@ assert_error(const char *a,unsigned l,const char *f,const char *n) {
            make_simple_string(f),make_simple_string(n),make_simple_string(strerror(errno)));
   else {
     emsg("The assertion %s on line %d of %s in function %s failed: %s",a,l,f,n,strerror(errno));
-    gcl_abort();
+    do_gcl_abort();
   }
 
 }
index 4385466c06a4049f6a243124c9de9c1684ae5c7b..06fc758cd2f1d25637bd2fba9b0f9da08583b096 100644 (file)
--- a/o/eval.c
+++ b/o/eval.c
@@ -134,12 +134,17 @@ funcall_vec(object fun,fixnum n,object *b) {
 
 }
 
+static object eval_vec[MAX_ARGS+1];
+
+void
+clear_eval_vec(void) {
+  memset(eval_vec,0,sizeof(eval_vec));
+}
 
 static object
 funcall_ap(object fun,fixnum n,va_list ap) {
 
-  static object b[MAX_ARGS+1];
-  object *t=b;
+  object *t=eval_vec;
   ufixnum j=labs(n),i;
 
   for (i=j;i--;)
@@ -148,11 +153,11 @@ funcall_ap(object fun,fixnum n,va_list ap) {
     object x=*--t;
     for (i=fun->fun.fun_minarg-(j-1);i--;*t++=x->c.c_car,x=x->c.c_cdr,n--)
       if (x==Cnil)
-       FEtoo_few_arguments(b,t);
+       FEtoo_few_arguments(eval_vec,t);
     *t++=x;
   }
 
-  return funcall_vec(fun,n,b);
+  return funcall_vec(fun,n,eval_vec);
 
 }
     
index d48aff90eabed9fdd8c61dc3db79e8c722b3ccea..c1f9f9f8cfe2d5382eb769bc300418335ed38e5c 100644 (file)
--- a/o/file.d
+++ b/o/file.d
@@ -1396,8 +1396,12 @@ load(const char *s) {
 
   filename = make_simple_string(s);
   vs_push(filename);
-  massert(realpath(s,FN2));
-  tfn = make_simple_string(FN2);
+  if (NO_TRUENAME)
+    tfn=filename;
+  else {
+    massert(realpath(s,FN2));
+    tfn = make_simple_string(FN2);
+  }
   bds_bind(sLAload_pathnameA,filename);
   bds_bind(sLAload_truenameA,tfn);
 
@@ -1959,7 +1963,7 @@ DEFUN("SOCKET-INT",object,fSsocket_int,SI,7,7,NONE,OO,OO,OO,OO,
            exit(0);
            break;
          case -1:
-           gcl_abort();
+           do_gcl_abort();
            break;
          default:
            close_stream(y);
diff --git a/o/gbc.c b/o/gbc.c
index 94761c6672631c207a775ccd097a52586d361d6f..95ad23d65a848005c56adfa4e0db43e4b71e73a2 100644 (file)
--- a/o/gbc.c
+++ b/o/gbc.c
@@ -813,7 +813,9 @@ mark_phase(void) {
 #ifndef N_RECURSION_REQD
 #define N_RECURSION_REQD 2
 #endif
-  mark_c_stack(0,N_RECURSION_REQD,mark_stack_carefully);
+
+  if (!saving_system)
+    mark_c_stack(0,N_RECURSION_REQD,mark_stack_carefully);
   
 }
 
@@ -925,6 +927,8 @@ mark_c_stack(jmp_buf env1, int n, void (*fn)(void *,void *,int)) {
   }
 #endif
 
+  c_stack_where=NULL;
+
 }
 
 static void
diff --git a/o/gmp.c b/o/gmp.c
index a8b783d0e35a5b79d0acdf7c63590340c1214276..360720729b74baf9aeba5329842ac45c1bf58f44 100644 (file)
--- a/o/gmp.c
+++ b/o/gmp.c
@@ -10,7 +10,7 @@ static void *gcl_gmp_realloc(void *oldmem, size_t oldsize, size_t newsize)
 {
   unsigned int *old,*new;
   if (!jmp_gmp) { /* No gc in alloc if jmp_gmp */
-    if (MP_SELF(big_gcprotect)) gcl_abort();
+    if (MP_SELF(big_gcprotect)) do_gcl_abort();
     MP_SELF(big_gcprotect)=oldmem;
     MP_ALLOCATED(big_gcprotect)=oldsize/MP_LIMB_SIZE;
   }
index cd1cef2870b1ffe13e9f70eb34dfac9580043019..5285df7a0b7a0c8466c65f971658b4650cc58dbd 100644 (file)
--- a/o/main.c
+++ b/o/main.c
@@ -333,18 +333,33 @@ acceptable_log_maxpage_bound(ufixnum l) {
      (void *)heap_end-data_start+CEI(rb_pointer-rb_begin(),PAGESIZE) < (1UL<<(l+1)));
 }
 
+void
+set_global_env_defaults(void) {
+  mem_multiple=1.0;
+  mem_bound=sizeof(fixnum)*8-1;
+  gc_alloc_min=0.05;
+  gc_page_min=0.5;
+  gc_page_max=0.75;
+  multiprocess_memory_pool=NULL;
+  wait_on_abort=0;
+  no_truename=0;
+}
+
 static void
 get_gc_environ(void) {
 
   const char *e;
 
-  mem_multiple=1.0;
+  set_global_env_defaults();
+
+  if (getenv("GCL_NO_TRUENAME"))
+    no_truename=1;
+
   if ((e=getenv("GCL_MEM_MULTIPLE"))) {
     massert(sscanf(e,"%lf",&mem_multiple)==1);
     massert(mem_multiple>=0.0);
   }
 
-  mem_bound=sizeof(fixnum)*8-1;
   if ((e=getenv("GCL_MEM_BOUND"))) {
     ufixnum f;
     massert(sscanf(e,"%lud",&f)==1);
@@ -354,19 +369,16 @@ get_gc_environ(void) {
     }
   }
 
-  gc_alloc_min=0.05;
   if ((e=getenv("GCL_GC_ALLOC_MIN"))) {
     massert(sscanf(e,"%lf",&gc_alloc_min)==1);
     massert(gc_alloc_min>=0.0);
   }
 
-  gc_page_min=0.5;
   if ((e=getenv("GCL_GC_PAGE_MIN"))||(e=getenv("GCL_GC_PAGE_THRESH"))) {/*legacy support*/
     massert(sscanf(e,"%lf",&gc_page_min)==1);
     massert(gc_page_min>=0.0);
   }
 
-  gc_page_max=0.75;
   if ((e=getenv("GCL_GC_PAGE_MAX"))) {
     massert(sscanf(e,"%lf",&gc_page_max)==1);
     massert(gc_page_max>=0.0);
@@ -377,7 +389,6 @@ get_gc_environ(void) {
       (*multiprocess_memory_pool=='t' || *multiprocess_memory_pool=='T'))/*GCL 2.6 compatability*/
     multiprocess_memory_pool=getenv("HOME");
 
-  wait_on_abort=0;
   if ((e=getenv("GCL_WAIT_ON_ABORT")))
     massert(sscanf(e,"%lu",&wait_on_abort)==1);
 
@@ -574,7 +585,7 @@ init_boot(void) {
   z=alloca(n);
   snprintf(z,n,"%-*.*s%s",(int)m,(int)m,d,s);
 #ifdef USE_LIBBOOT
-  if (!(v=dlopen(z,RTLD_LAZY|RTLD_GLOBAL)))
+  if (!(v=mdlopen(z,RTLD_LAZY|RTLD_GLOBAL)))
     printf("%s\n",dlerror());
   if (!(q=dlsym(v,"gcl_init_boot")))
     printf("%s\n",dlerror());
@@ -617,17 +628,20 @@ gcl_mprotect(void *v,unsigned long l,int p) {
 
 DEFVAR("*CODE-BLOCK-RESERVE*",sSAcode_block_reserveA,SI,Cnil,"");
 
-#define HAVE_GCL_CLEANUP
-
 void
 gcl_cleanup(int gc) {
 
+  frame_ptr fr;
+
   if (getenv("GCL_WAIT"))
     sleep(30);
 
-#if defined(USE_CLEANUP)
-  {extern void _cleanup(void);_cleanup();}
-#endif
+  if (sSPtop_abort_tagP && sSPtop_abort_tagP->s.s_dbind!=Cnil) {
+    fr=frs_sch_catch(sSPtop_abort_tagP->s.s_dbind);
+    vs_base[0]=sSPtop_abort_tagP->s.s_dbind;
+    vs_top=vs_base+1;
+    if (fr) unwind(fr,sSPtop_abort_tagP->s.s_dbind);
+  }
 
 #ifdef USE_GPROF
   gprof_cleanup();
@@ -655,14 +669,14 @@ gcl_cleanup(int gc) {
 static char *stack_to_be_allocated;
 
 int
-stack_ret(char *s,unsigned long size) {
+stack_ret(volatile char *s,unsigned long size) {
   int r,i;
   for (i=r=0;i<size;i++)
     r^=((unsigned char)s[i])|((ufixnum)(s+i));
   return r;
 }
 
-int
+static int
 get_stack_to_be_allocated(unsigned long size) {
   stack_to_be_allocated=alloca(size);
   memset(stack_to_be_allocated,0,size);
@@ -672,78 +686,38 @@ get_stack_to_be_allocated(unsigned long size) {
 DEFUN("EQUAL-TAIL-RECURSION-CHECK",object,fSequal_tail_recursion_check,SI,1,1,NONE,II,OO,OO,OO,(fixnum s),"") {
   object x0=make_list(s/sizeof(object)),x1=make_list(s/sizeof(object));
   char *w;
-  get_stack_to_be_allocated(s);
+  fixnum f;
+
+  f=get_stack_to_be_allocated(s);
   fLequal(x0,x1);
   for (w=stack_to_be_allocated;w<stack_to_be_allocated+s && !*w;w++);
-  RETURN1((object)(w-stack_to_be_allocated));
+  f+=w-stack_to_be_allocated;
+  stack_to_be_allocated=NULL;
+  RETURN1((object)f);
 }
 
-#if !defined(DARWIN)&&!defined(__MINGW32__)
-
-static int
-mbin(const char *s,char *o) {
-
-  struct stat ss;
-
-  if (!stat(s,&ss) && (ss.st_mode&S_IFMT)==S_IFREG && !access(s,R_OK|X_OK)) {
-    massert(realpath(s,o));
-    return 1;
-  }
-
-  return 0;
-
-}
-
-static int
-which(const char *n,char *o) {
-
-  char *s;
-
-  if (strchr(n,'/'))
-    return mbin(n,o);
-
-  massert(snprintf(FN1,sizeof(FN1),"%s",getenv("PATH"))>1);
-  for (s=NULL;(s=strtok(s ? NULL : FN1,":"));) {
-
-    massert(snprintf(FN2,sizeof(FN2),"%s/%s",s,n));
-    if (mbin(FN2,o))
-      return 1;
-
-  }
-
-  return 0;
-
-}
-
-#endif
-
 DEFUN("KCL-SELF",object,fSkcl_self,SI,0,0,NONE,OO,OO,OO,OO,(void),"") {
 
   return make_simple_string(kcl_self);
 
 }
 
-#if defined(__APPLE__)
-#include "disable_mac_aslr.h"
-#endif
-
 int
 main(int argc, char **argv, char **envp) {
 
-  GET_FULL_PATH_SELF(kcl_self);
-  *argv=kcl_self;
+#ifdef DISABLE_ASLR
+  disable_aslr(argc,argv,envp);
+#endif
+
+#include "cstack.h"
+
+  kcl_self=*argv;
 
   vs_top = vs_base = vs_org;
   ihs_top = ihs_org-1;
   bds_top = bds_org-1;
   frs_top = frs_org-1;
 
-#if defined(__APPLE__)
-  disable_aslr(argc, argv, envp);
-#endif
-
-#include "cstack.h"
-
   gcl_init_alloc(alloca(1));
 
   setbuf(stdin, stdin_buf); 
@@ -848,7 +822,7 @@ error(char *s)
   printf("\nUnrecoverable error: %s.\n", s);
   fflush(stdout);
 #ifdef UNIX
-  gcl_abort();
+  do_gcl_abort();
 #endif
 }
 
index 1525e2d91e18b5f1088b5b392edf0706b3bfcc46..592faf57125f22859415340cdcdd8a4b8cd59baa 100644 (file)
@@ -61,7 +61,7 @@
 #endif
 
 #define VOID void
-#define ERROR_MESSAGE(msg)     do{ emsg(msg); gcl_abort() ; } while(0)
+#define ERROR_MESSAGE(msg)     do{ emsg(msg); do_gcl_abort() ; } while(0)
 
 #ifdef STAND
 
index c295b49f86126eaaebda5384b7d422ed6ad10af1..6355c4f1374a0acb7932f8642c49a68a7f4ff58f 100644 (file)
@@ -79,7 +79,7 @@ rando(object x, object rs) {
 
 
 #ifdef UNIX
-#define RS_DEF_INIT time(0)
+#define RS_DEF_INIT ({char *e=getenv("SOURCE_DATE_EPOCH");e ? strtoul(e,NULL,10) : time(0);})
 #else
 #define RS_DEF_INIT 0
 #endif
index 6883a23953ee0759a632fafd09f2958f3a31f34c..c9de258c9ef6eeb410a2bc688f22ddb0ed75b3d7 100644 (file)
--- a/o/save.c
+++ b/o/save.c
@@ -1,4 +1,6 @@
 /* Copyright (C) 2024 Camm Maguire */
+#define NO_PRELINK_UNEXEC_DIVERSION
+
 #ifndef FIRSTWORD
 #include "include.h"
 #endif
@@ -13,25 +15,76 @@ memory_save(char *original_file, char *save_file)
   unexec(save_file,original_file,0,0,0);
 }
 
-#ifdef USE_CLEANUP
-extern void _cleanup();
-#endif
-
 LFD(siLsave)(void) {
 
   extern char *kcl_self;
+  extern void *shared_lib_start;
+  extern jmp_buf gmp_jmp;
 
   check_arg(1);
 
+  memset(FN1,0,sizeof(FN1));
+  coerce_to_filename(vs_base[0], FN1);
+
+  close_dlopen_list();
+  frs_top=frs_org-1;
   gcl_cleanup(1);
 
-  coerce_to_filename(vs_base[0], FN1);
+  /*FIXME clean this up when done*/
 
+  set_global_env_defaults();
+  shared_lib_start=NULL;
+  memset(gmp_jmp,0,sizeof(gmp_jmp));
+  memset(frs_org,0,(frs_limit-frs_org)*sizeof(*frs_org));
+  memset(bds_org,0,(bds_limit-bds_org)*sizeof(*bds_org));
+  memset(ihs_org,0,(ihs_limit-ihs_org)*sizeof(*ihs_org));
+  memset(vs_org,0,(vs_limit-vs_org)*sizeof(*vs_org));
+  {
+#if !defined(__APPLE__)
+    extern char **__environ;
+#endif
+    extern FILE *rl_instream;
+    extern char *rl_line_buffer;
+    extern void clear_eval_vec(void);
+
+#if !defined(__APPLE__)
+    __environ=NULL;
+#endif
+    rl_instream=NULL;
+    rl_readline_name=NULL;
+    rl_line_buffer=NULL;
+    rl_completion_entry_function=NULL;
+    stdin=NULL;
+    stdout=NULL;
+    stderr=NULL;
+    clear_eval_vec();
+    cs_limit=NULL;
+    cs_base=NULL;
+    cs_org=NULL;
+    memset(FN2,0,sizeof(FN2));
+    memset(FN3,0,sizeof(FN3));
+    memset(FN4,0,sizeof(FN4));
+    memset(FN5,0,sizeof(FN5));
+    ENVP=NULL;
+    ARGV=NULL;
+    ARGC=0;
+    my_stdin=NULL;
+    my_stdout=NULL;
+    my_stderr=NULL;
+    my_rl_readline_name_ptr=NULL;
+    my_rl_completion_entry_function_ptr=NULL;
+
+  }
+
+  {
+    void *v=kcl_self;
+    kcl_self=NULL;
 #ifdef MEMORY_SAVE
-  MEMORY_SAVE(kcl_self,FN1);
+    MEMORY_SAVE(v,FN1);
 #else    
-  memory_save(kcl_self, FN1);
-#endif 
+    memory_save(v, FN1);
+#endif
+  }
 
   /*  no return  */
   exit(0);
index cbe2b89de79d29f842c34e6334599fd478c12f86..91542a603adcf42af0fa84417e0d85410ee4f2e5 100644 (file)
--- a/o/sgbc.c
+++ b/o/sgbc.c
@@ -147,7 +147,8 @@ sgc_mark_phase(void) {
   }
 #endif 
   
-  mark_c_stack(0,N_RECURSION_REQD,mark_stack_carefully);
+  if (!saving_system)
+    mark_c_stack(0,N_RECURSION_REQD,mark_stack_carefully);
   
 }
 
index 972eb8bc1dd083357366f56afd7be1f415d95037..57f2e3f3c4c87c837559ce6ff91a15dd6196d496 100644 (file)
@@ -864,7 +864,6 @@ typedef struct {
 typedef struct {
   uint32_t magic;      /* 0xfade0b01 (CSMAGIC_BLOBWRAPPER) */
   uint32_t length;     /* Total length of header + CMS data */
-  uint8_t zero[18040-30];
 } CS_BlobWrapper;
 
 #include <CommonCrypto/CommonDigest.h>
@@ -927,7 +926,7 @@ dump_code_signature(struct segment_command *le_seg,
   mpwrite(&mh,sizeof(mh),0);
 
   sb.magic=htonl(0xfade0cc0);
-  sb.length=htonl(ldc.datasize-sizeof(cms.zero)-2);
+  sb.length=htonl(ldc.datasize);
   sb.count=htonl(sizeof(bi)/sizeof(*bi));
   mwrite(&sb,sizeof(sb));
 
@@ -1050,10 +1049,8 @@ dump_it () {
 
        } else if (strncmp (scp->segname, "__HEAP", 16) == 0) {
 
-         extern char *data_start;
          struct section *sectp = (struct section *) (scp + 1);
          unsigned long header_offset=curr_header_offset + sizeof (struct segment_command);
-         extern int in_pre_gcl;/*support libboot.so*/
 
          if (core_end-data_start>heap_vmsize)
            unexec_error ("data exceeds __HEAP vmsize");
index a90a34b21250ca28043bb173e088b593ec78f77c..42b98cf10423408f9b681bf5c7b3428a57e2ac9c 100644 (file)
@@ -289,7 +289,11 @@ DEFUN("READLINKAT",object,fSreadlinkat,SI,2,2,NONE,OI,OO,OO,OO,(fixnum d,object
 
 DEFUN("GETCWD",object,fSgetcwd,SI,0,0,NONE,OO,OO,OO,OO,(void),"") {
 
-  massert(getcwd(FN1,sizeof(FN1)));
+  if (NO_TRUENAME)
+    massert(snprintf(FN1,sizeof(FN1),"./")>=0);
+  else
+    massert(getcwd(FN1,sizeof(FN1)));
+
   RETURN1(make_simple_string(FN1));
 
 }
index 20b5071b944794e60d559e20e45c9e3b86bd61c6..c8e3f9e89c9072ecdc0c255164b74eb2e729dce7 100644 (file)
@@ -24,6 +24,8 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
        unixsave.c
 */
 
+#define NO_PRELINK_UNEXEC_DIVERSION
+
 #define IN_UNIXSAVE
 #ifndef FIRSTWORD
 #include "include.h"
@@ -146,7 +148,8 @@ LFD(Lsave)() {
   check_arg(1);
   check_type_or_pathname_string_symbol_stream(&vs_base[0]);
   coerce_to_filename(vs_base[0], FN1);
-  
+
+  shared_lib_start=NULL;
   _cleanup();
   
   memory_save(kcl_self, FN1);
index b61775a5ad5ed49ebe10f4b13f03310796f5050f..73b3879c716360111c7fa05d9771ea6dad4cb441 100644 (file)
--- a/o/usig2.c
+++ b/o/usig2.c
@@ -273,7 +273,7 @@ before_interrupt(struct save_for_interrupt *p,int allowed) {
 #include "usig2_aux.c"
 
    if (pp-p->save_objects>=(sizeof(p->save_objects)/sizeof(void *)))
-     gcl_abort();
+     do_gcl_abort();
 
  }